package com.kenai.jbosh;

final class AttrAccept extends AbstractAttr<String>
{
  private final String[] encodings;

  private AttrAccept(String paramString)
  {
    super(paramString);
    this.encodings = paramString.split("[\\s,]+");
  }

  static AttrAccept createFromString(String paramString)
    throws BOSHException
  {
    AttrAccept localAttrAccept;
    if (paramString == null)
      localAttrAccept = null;
    while (true)
    {
      return localAttrAccept;
      localAttrAccept = new AttrAccept(paramString);
    }
  }

  boolean isAccepted(String paramString)
  {
    String[] arrayOfString = this.encodings;
    int i = arrayOfString.length;
    int j = 0;
    while (true)
    {
      int k;
      if (j >= i)
        k = 0;
      while (true)
      {
        return k;
        if (!(arrayOfString[j].equalsIgnoreCase(paramString)))
          break;
        k = 1;
      }
      ++j;
    }
  }
}